package com.emep.changzhi.analyse.repository.equipment;

import com.emep.changzhi.analyse.entity.equipment.MoitorTypeInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;

import javax.transaction.Transactional;

/**
 * @author yangj
 * @version V1.0
 * @Description: 监测站点持久层接口
 * @date 2018/2/26  15:32
 */
public interface MoitorTypeInfoRepository extends JpaRepository<MoitorTypeInfo, Long> {

    //根据id删除equipmentMoniter
    @Modifying
    @Transactional
    Integer deleteMoitorSiteInfoById(String id);


    //根据id查询EquipmentMoniter
    MoitorTypeInfo findMoitorSiteInfoById(String id);

    Page<MoitorTypeInfo> findAll(Specification<MoitorTypeInfo> spec, Pageable pageable);
}
